package report.entity;

public class MySampleResult {

	// 用来区分执行机
	public String currentHost;

	// 采样次数
	public int sampleCount;

	// 错误次数
	public int errorCount;

	// 发送字节
	public long sentBytes;

	// 接受字节
	public long receiveBytes;

	// 当前线程数
	public int threadCount;

	// 获取采样的名称
	public String sampleLabel;

	// 线程组
	public String threadGroupName;

	// 采样耗时
	public long delayMS;

	// 采样结果是否成功
	public boolean success;

	// 请求内容：仅失败时记录
	public String requestData;

	// 响应内容：仅失败时记录
	public String responseData;

	public MySampleResult(String currentHost, int sampleCount, int errorCount, long sentBytes, long receiveBytes,
						  int threadCount, String sampleLabel, String threadGroupName, long delayMS, String requestData,
						  String responseData) {
		super();
		this.currentHost = currentHost;
		this.sampleCount = sampleCount;
		this.errorCount = errorCount;
		this.sentBytes = sentBytes;
		this.receiveBytes = receiveBytes;
		this.threadCount = threadCount;
		this.sampleLabel = sampleLabel;
		this.threadGroupName = threadGroupName;
		this.delayMS = delayMS;
		this.success = false;
		this.requestData = requestData;
		this.responseData = responseData;
	}

	public MySampleResult(String currentHost, int sampleCount, int errorCount, long sentBytes, long receiveBytes,
						  int threadCount, String sampleLabel, String threadGroupName, long delayMS) {
		super();
		this.currentHost = currentHost;
		this.sampleCount = sampleCount;
		this.errorCount = errorCount;
		this.sentBytes = sentBytes;
		this.receiveBytes = receiveBytes;
		this.threadCount = threadCount;
		this.sampleLabel = sampleLabel;
		this.threadGroupName = threadGroupName;
		this.delayMS = delayMS;
		this.success = true;
	}

	@Override
	public String toString() {
		return "MySampleResult [currentHost=" + currentHost + ", sampleCount=" + sampleCount + ", errorCount="
				+ errorCount + ", sentBytes=" + sentBytes + ", receiveBytes=" + receiveBytes + ", threadCount="
				+ threadCount + ", sampleLabel=" + sampleLabel + ", threadGroupName=" + threadGroupName + ", delayMS="
				+ delayMS + ", success=" + success + ", requestData=" + requestData + ", responseData=" + responseData
				+ "]";
	}
}